home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / challenge / 12.09-Sep96 / Testcode96.09R2.sit / Testcode96.09R2 / README MiniVM Test Code next >
Text File  |  1996-08-28  |  3KB  |  54 lines

  1. Enclosed are 4 test cases for the September 1996 Programmer's Challenge
  2.  
  3. Three of the test cases are Applets created with Symantec Cafe.  The
  4. fourth is an application created with Cafe.
  5.  
  6. The JavaMiniVM.µ project parses each of the class files, calls one of
  7. the methods, and compares the result to an expected value.
  8.  
  9. Each test case includes a .dmp file created by Symantec's DumpClass
  10. routine containing a disassembly of the class file.
  11.  
  12. Note that these are representative test cases only.  The Challenge
  13. test code may stress your code in ways these cases do not.  Feel free
  14. to write your own applets following these examples.
  15.  
  16. REVISION 1, 20 Aug 96
  17. - removed a call to a java/awt/Component method inadvertently left in
  18. the swarm example
  19. - corrected the Fib example so it does not require input parameters
  20. - added a few opcodes to the MiscByteCodes example (invokenonvirtual,
  21. tableswitch)
  22. - corrected the parsing logic for the constant pool so it correctly
  23. deals with 8 byte constants
  24.  
  25. NOTE: Your miniVM is expected to set up the execution frame for the
  26. class called by the test code.  In a full VM implementation, this
  27. would involve allocating space for local variables and the operand
  28. stack, as well as running the default constructor for your class.  In
  29. the Challenge, class variables will be initialized explicitly in code;
  30. you don't need to worry about a constructor.  You _do_ need to create
  31. an object reference to your class before beginning execution.  (See
  32. the first instruction, aload_0, in the swarm.myRun method.)
  33.  
  34. REVISION 2, 28 Aug 96
  35.  
  36. - clarified the fact that an object reference is an
  37. implementation-defined format, and requested that solutions document
  38. the format used (Hello World example)
  39. // The Java VM specification states:
  40. //    The specification does not require any particular internal structure for
  41. //    objects.  In our implementation, an object reference is a handle, which is
  42. //    a pair of pointers: one to a method table for the object, and the other
  43. //    to the data allocated for the object.  Other implementations may use inline 
  44. //    caching, rather than method table dispatch ...
  45. // Since the format of an object reference is implementation-defined, your 
  46. // solution should document the format that your miniVM uses for an object reference.
  47. // The test code will use this information to access the data for that object and 
  48. // compare it to the expected value.  Sample code to extract object data from 
  49. // your implementation-defined object reference is welcome but not required.
  50.  
  51. - removed a reference to the Math class in the swarm example
  52. - added code to the MiscByteCodes class to generate multianewarray,
  53. arraylength, aaload, and aastore byte codes
  54.